3.1756 \(\int \frac{\sqrt{a+\frac{b}{x}}}{\sqrt{x}} \, dx\)

Optimal. Leaf size=49 \[ 2 \sqrt{x} \sqrt{a+\frac{b}{x}}-2 \sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b}}{\sqrt{x} \sqrt{a+\frac{b}{x}}}\right ) \]

[Out]

2*Sqrt[a + b/x]*Sqrt[x] - 2*Sqrt[b]*ArcTanh[Sqrt[b]/(Sqrt[a + b/x]*Sqrt[x])]

________________________________________________________________________________________

Rubi [A]  time = 0.0248701, antiderivative size = 49, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {337, 277, 217, 206} \[ 2 \sqrt{x} \sqrt{a+\frac{b}{x}}-2 \sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b}}{\sqrt{x} \sqrt{a+\frac{b}{x}}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + b/x]/Sqrt[x],x]

[Out]

2*Sqrt[a + b/x]*Sqrt[x] - 2*Sqrt[b]*ArcTanh[Sqrt[b]/(Sqrt[a + b/x]*Sqrt[x])]

Rule 337

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = Denominator[m]}, -Dist[k/c, Subst[
Int[(a + b/(c^n*x^(k*n)))^p/x^(k*(m + 1) + 1), x], x, 1/(c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && ILtQ[n,
 0] && FractionQ[m]

Rule 277

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[((c*x)^(m + 1)*(a + b*x^n)^p)/(c*(m +
1)), x] - Dist[(b*n*p)/(c^n*(m + 1)), Int[(c*x)^(m + n)*(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b, c}, x] &&
IGtQ[n, 0] && GtQ[p, 0] && LtQ[m, -1] &&  !ILtQ[(m + n*p + n + 1)/n, 0] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\sqrt{a+\frac{b}{x}}}{\sqrt{x}} \, dx &=-\left (2 \operatorname{Subst}\left (\int \frac{\sqrt{a+b x^2}}{x^2} \, dx,x,\frac{1}{\sqrt{x}}\right )\right )\\ &=2 \sqrt{a+\frac{b}{x}} \sqrt{x}-(2 b) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b x^2}} \, dx,x,\frac{1}{\sqrt{x}}\right )\\ &=2 \sqrt{a+\frac{b}{x}} \sqrt{x}-(2 b) \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{1}{\sqrt{a+\frac{b}{x}} \sqrt{x}}\right )\\ &=2 \sqrt{a+\frac{b}{x}} \sqrt{x}-2 \sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b}}{\sqrt{a+\frac{b}{x}} \sqrt{x}}\right )\\ \end{align*}

Mathematica [A]  time = 0.0823442, size = 78, normalized size = 1.59 \[ \frac{2 \sqrt{x} \sqrt{a+\frac{b}{x}} \left (-\sqrt{a} \sqrt{b} \sqrt{x} \sqrt{\frac{b}{a x}+1} \sinh ^{-1}\left (\frac{\sqrt{b}}{\sqrt{a} \sqrt{x}}\right )+a x+b\right )}{a x+b} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + b/x]/Sqrt[x],x]

[Out]

(2*Sqrt[a + b/x]*Sqrt[x]*(b + a*x - Sqrt[a]*Sqrt[b]*Sqrt[1 + b/(a*x)]*Sqrt[x]*ArcSinh[Sqrt[b]/(Sqrt[a]*Sqrt[x]
)]))/(b + a*x)

________________________________________________________________________________________

Maple [A]  time = 0.009, size = 50, normalized size = 1. \begin{align*} -2\,{\frac{\sqrt{x}}{\sqrt{ax+b}}\sqrt{{\frac{ax+b}{x}}} \left ( \sqrt{b}{\it Artanh} \left ({\frac{\sqrt{ax+b}}{\sqrt{b}}} \right ) -\sqrt{ax+b} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b/x)^(1/2)/x^(1/2),x)

[Out]

-2*((a*x+b)/x)^(1/2)*x^(1/2)*(b^(1/2)*arctanh((a*x+b)^(1/2)/b^(1/2))-(a*x+b)^(1/2))/(a*x+b)^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)^(1/2)/x^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.52509, size = 252, normalized size = 5.14 \begin{align*} \left [\sqrt{b} \log \left (\frac{a x - 2 \, \sqrt{b} \sqrt{x} \sqrt{\frac{a x + b}{x}} + 2 \, b}{x}\right ) + 2 \, \sqrt{x} \sqrt{\frac{a x + b}{x}}, 2 \, \sqrt{-b} \arctan \left (\frac{\sqrt{-b} \sqrt{x} \sqrt{\frac{a x + b}{x}}}{b}\right ) + 2 \, \sqrt{x} \sqrt{\frac{a x + b}{x}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)^(1/2)/x^(1/2),x, algorithm="fricas")

[Out]

[sqrt(b)*log((a*x - 2*sqrt(b)*sqrt(x)*sqrt((a*x + b)/x) + 2*b)/x) + 2*sqrt(x)*sqrt((a*x + b)/x), 2*sqrt(-b)*ar
ctan(sqrt(-b)*sqrt(x)*sqrt((a*x + b)/x)/b) + 2*sqrt(x)*sqrt((a*x + b)/x)]

________________________________________________________________________________________

Sympy [A]  time = 3.07723, size = 68, normalized size = 1.39 \begin{align*} \frac{2 \sqrt{a} \sqrt{x}}{\sqrt{1 + \frac{b}{a x}}} - 2 \sqrt{b} \operatorname{asinh}{\left (\frac{\sqrt{b}}{\sqrt{a} \sqrt{x}} \right )} + \frac{2 b}{\sqrt{a} \sqrt{x} \sqrt{1 + \frac{b}{a x}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)**(1/2)/x**(1/2),x)

[Out]

2*sqrt(a)*sqrt(x)/sqrt(1 + b/(a*x)) - 2*sqrt(b)*asinh(sqrt(b)/(sqrt(a)*sqrt(x))) + 2*b/(sqrt(a)*sqrt(x)*sqrt(1
 + b/(a*x)))

________________________________________________________________________________________

Giac [A]  time = 1.29985, size = 84, normalized size = 1.71 \begin{align*} 2 \,{\left (\frac{b \arctan \left (\frac{\sqrt{a x + b}}{\sqrt{-b}}\right )}{\sqrt{-b}} + \sqrt{a x + b} - \frac{b \arctan \left (\frac{\sqrt{b}}{\sqrt{-b}}\right ) + \sqrt{-b} \sqrt{b}}{\sqrt{-b}}\right )} \mathrm{sgn}\left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)^(1/2)/x^(1/2),x, algorithm="giac")

[Out]

2*(b*arctan(sqrt(a*x + b)/sqrt(-b))/sqrt(-b) + sqrt(a*x + b) - (b*arctan(sqrt(b)/sqrt(-b)) + sqrt(-b)*sqrt(b))
/sqrt(-b))*sgn(x)